package com.enroll.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.enroll.dao.FacultyDao;
import com.enroll.model.Faculty;
import com.enroll.sevice.FacultyService;

@Service("facultyService")
public class FacultyServiceImpl implements FacultyService {

	@Autowired
	FacultyDao facultyDao;
	
	public void setFacultyDao(FacultyDao facultyDao) {
		this.facultyDao = facultyDao;
	}

	@Override
	public void save(Faculty faculty) {
		facultyDao.save(faculty);
	}

	@Override
	public Faculty findById(int id) {
		return facultyDao.findById(id);
	}

	@Override
	public void update(Faculty faculty) {
		facultyDao.update(faculty);
		
	}

	@Override
	public void delete(Faculty faculty) {
		facultyDao.delete(faculty);
	}

	@Override
	public List<Faculty> findAll() {
		return facultyDao.findAll();
	}

}
